class AddCategoryTree < ActiveRecord::Migration
  def self.up
    # Top for the Tree
    rootCategory = Category.create(:name => "Welcome to Henry Wagner Photography", :code => "root", :keywords => "Henry Wagner,pictures,photos,photography")
    
    # Categories that are part of the root level
    # newPhotography = Category.create(:name => "New Photography", :code => "new", :category_id => rootCategory[:id], :order => 0)
    portfolio = Category.create(:name => "Portfoilio", :code => "portfolio", :category_id => rootCategory[:id], :order => 1, :image_id => Image.find(:first, :conditions => ["filename = ?", "ppl002.jpg"]).id)
    ca = Category.create(:name => "California", :code => "california", :category_id => rootCategory[:id], :order => 2, :image_id => Image.find(:first, :conditions => ["filename = ?", "yose080.jpg"]).id)
    nyc = Category.create(:name => "New York City", :code => "nyc", :category_id => rootCategory[:id], :order => 3, :image_id => Image.find(:first, :conditions => ["filename = ?", "st066.jpg"]).id)
    concert = Category.create(:name => "Concert Photography", :code => "concert", :category_id => rootCategory[:id], :order => 4, :image_id => Image.find(:first, :conditions => ["filename = ?", "msg_132.jpg"]).id)
    europe = Category.create(:name => "Europe", :code => "europe", :category_id => rootCategory[:id], :order => 5, :image_id => Image.find(:first, :conditions => ["filename = ?", "IMG_2610.jpg"]).id)
    starwars = Category.create(:name => "Star Wars Adventures", :code => "starwars", :category_id => rootCategory[:id], :order => 6, :image_id => Image.find(:first, :conditions => ["filename = ?", "sw070.jpg"]).id)
    texas = Category.create(:name => "Texas Wildflowers", :code => "texas", :category_id => rootCategory[:id], :order => 7, :image_id => Image.find(:first, :conditions => ["filename = ?", "CRW_3293.jpg"]).id)
    northEast = Category.create(:name => "The North East", :code => "northeast", :category_id => rootCategory[:id], :order => 8, :image_id => Image.find(:first, :conditions => ["filename = ?", "walden010.jpg"]).id)
    # america = Category.create(:name => "The Great American Drive", :code => "america", :category_id => rootCategory[:id], :order => 9)
    space = Category.create(:name => "Astro Photography", :code => "space", :category_id => rootCategory[:id], :order => 10, :image_id => Image.find(:first, :conditions => ["filename = ?", "CRW_3403.jpg"]).id)
    # povray = Category.create(:name => "POV-Ray", :code => "povray", :category_id => rootCategory[:id], :order => 11)
    ff = Category.create(:name => "Family &amp; Friends", :code => "ff", :category_id => rootCategory[:id], :order => 12, :image_id => Image.find(:first, :conditions => ["filename = ?", "IMG_5442.jpg"]).id)
    
    # Categories that are part of the Portfolio level
    westportfolio = Category.find_by_code("westportfolio")
    westportfolio.category_id = portfolio[:id]
    westportfolio.order = 0
    westportfolio.image_id = Image.find(:first, :conditions => ["filename = ?", "ppl002.jpg"]).id
    westportfolio.save
    
    eastportfolio = Category.find_by_code("eastportfolio")
    eastportfolio.category_id = portfolio[:id]
    eastportfolio.order = 1
    eastportfolio.image_id = Image.find(:first, :conditions => ["filename = ?", "snow_023.jpg"]).id
    eastportfolio.save
    
    u2portfolio = Category.find_by_code("u2portfolio")
    u2portfolio.category_id = portfolio[:id]
    u2portfolio.order = 2
    u2portfolio.image_id = Image.find(:first, :conditions => ["filename = ?", "Sea61.jpg"]).id
    u2portfolio.save
    
    wildportfolio = Category.find_by_code("wildportfolio")
    wildportfolio.category_id = portfolio[:id]
    wildportfolio.order = 3
    wildportfolio.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0060.jpg"]).id
    wildportfolio.save
    
    # Categories that are part of the California level
    coast = Category.create(:name => "Coastal California", :code => "coast", :category_id => ca[:id], :order => 0, :description => "Photography from the Coast of California, moving north to south from the Redwood forests and rugged coastline of the Lost Coast, through the San Francisco Bay Area, and south to Big Sur and San Simeon.", :image_id => Image.find(:first, :conditions => ["filename = ?", "bl003.jpg"]).id)
    redwoods = Category.find_by_code("redwoods")
    redwoods.category_id = coast[:id]
    redwoods.order = 0
    redwoods.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_1443_L16_a_f_100.jpg"]).id
    redwoods.save
    
    lc2001 = Category.find_by_code("lc2001")
    lc2001.category_id = coast[:id]
    lc2001.order = 1
    lc2001.image_id = Image.find(:first, :conditions => ["filename = ?", "lc_003.jpg"]).id
    lc2001.save
    
    lostcoast = Category.find_by_code("lostcoast")
    lostcoast.category_id = coast[:id]
    lostcoast.order = 2
    lostcoast.image_id = Image.find(:first, :conditions => ["filename = ?", "lc024.jpg"]).id
    lostcoast.save
    
    pointarena = Category.find_by_code("pointarena")
    pointarena.category_id = coast[:id]
    pointarena.order = 3
    pointarena.image_id = Image.find(:first, :conditions => ["filename = ?", "pa_018.jpg"]).id
    pointarena.save
    
    mttam = Category.find_by_code("mttam")
    mttam.category_id = coast[:id]
    mttam.order = 4
    mttam.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_4825.jpg"]).id
    mttam.save
    
    muirwoods = Category.find_by_code("muirwoods")
    muirwoods.category_id = coast[:id]
    muirwoods.order = 5
    muirwoods.image_id = Image.find(:first, :conditions => ["filename = ?", "mw007.jpg"]).id
    muirwoods.save
    
    sf = Category.create(:name => "San Francisco", :code => "sf", :category_id => coast[:id], :order => 6, :image_id => Image.find(:first, :conditions => ["filename = ?", "IMG_0004.jpg"]).id)
    sfcity = Category.find_by_code("sfcity")
    sfcity.category_id = sf[:id]
    sfcity.order = 0
    sfcity.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0004.jpg"]).id
    sfcity.save
    
    sfparrots = Category.find_by_code("sfparrots")
    sfparrots.category_id = sf[:id]
    sfparrots.order = 1
    sfparrots.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_1628.jpg"]).id
    sfparrots.save
    
    sf2hip = Category.find_by_code("sf2hip")
    sf2hip.category_id = sf[:id]
    sf2hip.order = 2
    sf2hip.image_id = Image.find(:first, :conditions => ["filename = ?", "hip001.jpg"]).id
    sf2hip.save
    
    xgamessf = Category.find_by_code("xgamessf")
    xgamessf.category_id = sf[:id]
    xgamessf.order = 3
    xgamessf.image_id = Image.find(:first, :conditions => ["filename = ?", "sf025.jpg"]).id
    xgamessf.save
    
    sfantiwar = Category.find_by_code("sfantiwar")
    sfantiwar.category_id = sf[:id]
    sfantiwar.order = 4
    sfantiwar.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_2836.jpg"]).id
    sfantiwar.save

    # Back to Coastal California
    baylands = Category.find_by_code("baylands")
    baylands.category_id = coast[:id]
    baylands.order = 7
    baylands.image_id = Image.find(:first, :conditions => ["filename = ?", "bl003.jpg"]).id
    baylands.save
    
    mview2003 = Category.find_by_code("mview2003")
    mview2003.category_id = coast[:id]
    mview2003.order = 8
    mview2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_4148.jpg"]).id
    mview2003.save
    
    bigbasin = Category.find_by_code("bigbasin")
    bigbasin.category_id = coast[:id]
    bigbasin.order = 9
    bigbasin.image_id = Image.find(:first, :conditions => ["filename = ?", "bb_001.jpg"]).id
    bigbasin.save
    
    pigeonpoint = Category.find_by_code("pigeonpoint")
    pigeonpoint.category_id = coast[:id]
    pigeonpoint.order = 10
    pigeonpoint.image_id = Image.find(:first, :conditions => ["filename = ?", "ppl002.jpg"]).id
    pigeonpoint.save
    
    anonuevo = Category.find_by_code("anonuevo")
    anonuevo.category_id = coast[:id]
    anonuevo.order = 11
    anonuevo.image_id = Image.find(:first, :conditions => ["filename = ?", "an001.jpg"]).id
    anonuevo.save
    
    santacruz = Category.find_by_code("santacruz")
    santacruz.category_id = coast[:id]
    santacruz.order = 12
    santacruz.image_id = Image.find(:first, :conditions => ["filename = ?", "sc035.jpg"]).id
    santacruz.save
    
    # Monterey categories
    monterey = Category.create(:name => "Monterey Bay", :code => "monterey", :category_id => coast[:id], :order => 13, :image_id => Image.find(:first, :conditions => ["filename = ?", "IMG_0088.jpg"]).id)
    scuba = Category.find_by_code("scuba")
    scuba.category_id = monterey[:id]
    scuba.order = 0
    scuba.image_id = Image.find(:first, :conditions => ["filename = ?", "mray124.jpg"]).id
    scuba.save

    aquarium = Category.find_by_code("aquarium")
    aquarium.category_id = monterey[:id]
    aquarium.order = 1
    aquarium.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0088.jpg"]).id
    aquarium.save
    
    sealions = Category.find_by_code("sealions")
    sealions.category_id = monterey[:id]
    sealions.order = 2
    sealions.image_id = Image.find(:first, :conditions => ["filename = ?", "mray131.jpg"]).id
    sealions.save

    # Back to Coastal California    
    bigsur = Category.find_by_code("bigsur")
    bigsur.category_id = coast[:id]
    bigsur.order = 14
    bigsur.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_0364.jpg"]).id
    bigsur.save
    
    esalen = Category.find_by_code("esalen")
    esalen.category_id = coast[:id]
    esalen.order = 15
    esalen.image_id = Image.find(:first, :conditions => ["filename = ?", "es024.jpg"]).id
    esalen.save
    
    # San Simeon categories
    sansimeon = Category.create(:name => "San Simeon", :code => "sansimeon", :category_id => coast[:id], :order => 16, :image_id => Image.find(:first, :conditions => ["filename = ?", "CRW_0206.jpg"]).id)
    hearstcastle = Category.find_by_code("hearstcastle")
    hearstcastle.category_id = sansimeon[:id]
    hearstcastle.order = 0
    hearstcastle.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_0206.jpg"]).id
    hearstcastle.save
        
    elephantseals = Category.find_by_code("elephantseals")
    elephantseals.category_id = sansimeon[:id]
    elephantseals.order = 1
    elephantseals.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_0190.jpg"]).id
    elephantseals.save
        
    windsurf = Category.find_by_code("windsurf")
    windsurf.category_id = sansimeon[:id]
    windsurf.order = 2
    windsurf.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0268.jpg"]).id
    windsurf.save
    
    # More from Coastal California        
    getty = Category.find_by_code("getty")
    getty.category_id = coast[:id]
    getty.order = 17
    getty.image_id = Image.find(:first, :conditions => ["filename = ?", "getty_012.jpg"]).id
    getty.save
    
    # Find Yosemite category and link it to the California category
    yosemite = Category.find_by_code("yosemite")
    yosemite.category_id = ca[:id]
    yosemite.order = 2
    yosemite.image_id = Image.find(:first, :conditions => ["filename = ?", "yose080.jpg"]).id
    yosemite.save
    
    # Find Sequoia category and link it to the California category
    sequoia = Category.find_by_code("sequoia")
    sequoia.category_id = ca[:id]
    sequoia.order = 2
    sequoia.image_id = Image.find(:first, :conditions => ["filename = ?", "seq004.jpg"]).id
    sequoia.save
    
    ml3day = Category.find_by_code("ml3day")
    ml3day.category_id = ca[:id]
    ml3day.order = 4
    ml3day.image_id = Image.find(:first, :conditions => ["filename = ?", "ml_006.jpg"]).id
    ml3day.save
    
    fallcolor = Category.create(:name => "Fall Colors in the Eastern Sierra", :code => "fallcolor", :category_id => ca[:id], :order => 5, :image_id => Image.find(:first, :conditions => ["filename = ?", "CRW_1910_8_NNNN_A_f_800.jpg"]).id)
    fallcolor2001 = Category.find_by_code("fallcolor2001")
    fallcolor2001.category_id = fallcolor[:id]
    fallcolor2001.order = 0
    fallcolor2001.image_id = Image.find(:first, :conditions => ["filename = ?", "cl_040.jpg"]).id
    fallcolor2001.save

    fallcolor2002 = Category.find_by_code("fallcolor2002")
    fallcolor2002.category_id = fallcolor[:id]
    fallcolor2002.order = 1
    fallcolor2002.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_1910_8_NNNN_A_f_800.jpg"]).id
    fallcolor2002.save

    fallcolor2003 = Category.find_by_code("fallcolor2003")
    fallcolor2003.category_id = fallcolor[:id]
    fallcolor2003.order = 2
    fallcolor2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_4966.jpg"]).id
    fallcolor2003.save

    fallcolor2005 = Category.find_by_code("fallcolor2005")
    fallcolor2005.category_id = fallcolor[:id]
    fallcolor2005.order = 3
    fallcolor2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0639.jpg"]).id
    fallcolor2005.save
    
    md2003 = Category.find_by_code("md2003")
    md2003.category_id = ca[:id]
    md2003.order = 6
    md2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_3583.jpg"]).id
    md2003.save
    
    monoLake = Category.find_by_code("monolake")
    monoLake.category_id = ca[:id]
    monoLake.order = 7
    monoLake.image_id = Image.find(:first, :conditions => ["filename = ?", "ml_079.jpg"]).id
    monoLake.save
    
    juneLake = Category.find_by_code("junelake")
    juneLake.category_id = ca[:id]
    juneLake.order = 8
    juneLake.image_id = Image.find(:first, :conditions => ["filename = ?", "jl_018.jpg"]).id
    juneLake.save
    
    deathValley = Category.find_by_code("deathvalley")
    deathValley.category_id = ca[:id]
    deathValley.order = 9
    deathValley.image_id = Image.find(:first, :conditions => ["filename = ?", "dv_203.jpg"]).id
    deathValley.save
    
    pinnacles = Category.find_by_code("pinnacles")
    pinnacles.category_id = ca[:id]
    pinnacles.order = 10
    pinnacles.image_id = Image.find(:first, :conditions => ["filename = ?", "pin_049.jpg"]).id
    pinnacles.save
    
    carson = Category.find_by_code("carson")
    carson.category_id = ca[:id]
    carson.order = 11
    carson.image_id = Image.find(:first, :conditions => ["filename = ?", "cr_039.jpg"]).id
    carson.save
    
    sanjv = Category.find_by_code("sanjv")
    sanjv.category_id = ca[:id]
    sanjv.order = 12
    sanjv.image_id = Image.find(:first, :conditions => ["filename = ?", "sanjv002.jpg"]).id
    sanjv.save
    
    bodie = Category.find_by_code("bodie")
    bodie.category_id = ca[:id]
    bodie.order = 13
    bodie.image_id = Image.find(:first, :conditions => ["filename = ?", "bd024.jpg"]).id
    bodie.save
    
    # Categories that are part of the California Trip 1999 level
    catrip = Category.create(:name => "Coastal Trek - 1999", :code => "catrip99", :category_id => ca[:id], :order => 4, :image_id => Image.find(:first, :conditions => ["filename = ?", "line003.jpg"]).id)
    
    la = Category.find_by_code("la")
    la.category_id = catrip[:id]
    la.order = 0
    la.image_id = Image.find(:first, :conditions => ["filename = ?", "line003.jpg"]).id
    la.save

    desert99 = Category.find_by_code("desert99")
    desert99.category_id = catrip[:id]
    desert99.order = 1
    desert99.image_id = Image.find(:first, :conditions => ["filename = ?", "dv013.jpg"]).id
    desert99.save

    caTrip99Yose = Category.find_by_code("catrip99yose")
    caTrip99Yose.category_id = catrip[:id]
    caTrip99Yose.order = 2
    caTrip99Yose.image_id = Image.find(:first, :conditions => ["filename = ?", "yose010.jpg"]).id
    caTrip99Yose.save

    bigsur99 = Category.find_by_code("bigsur99")
    bigsur99.category_id = catrip[:id]
    bigsur99.order = 3
    bigsur99.image_id = Image.find(:first, :conditions => ["filename = ?", "bigsur003.jpg"]).id
    bigsur99.save

    lake = Category.find_by_code("lake")
    lake.category_id = catrip[:id]
    lake.order = 4
    lake.image_id = Image.find(:first, :conditions => ["filename = ?", "lake002.jpg"]).id
    lake.save

    getty99 = Category.find_by_code("getty99")
    getty99.category_id = catrip[:id]
    getty99.order = 5
    getty99.image_id = Image.find(:first, :conditions => ["filename = ?", "getty006.jpg"]).id
    getty99.save

    caTrip99IR = Category.find_by_code("catrip99ir")
    caTrip99IR.category_id = catrip[:id]
    caTrip99IR.order = 6
    caTrip99IR.image_id = Image.find(:first, :conditions => ["filename = ?", "irca004.jpg"]).id
    caTrip99IR.save
    
    # Categories that are part of the New York City level
    empirest = Category.find_by_code("empirest")
    empirest.category_id = nyc[:id]
    empirest.order = 0
    empirest.image_id = Image.find(:first, :conditions => ["filename = ?", "es_046.jpg"]).id
    empirest.save
    
    bksnow = Category.find_by_code("bksnow")
    bksnow.category_id = nyc[:id]
    bksnow.order = 1
    bksnow.image_id = Image.find(:first, :conditions => ["filename = ?", "snow_018.jpg"]).id
    bksnow.save
    
    grandcentral = Category.find_by_code("grandcentral")
    grandcentral.category_id = nyc[:id]
    grandcentral.order = 2
    grandcentral.image_id = Image.find(:first, :conditions => ["filename = ?", "gc_002.jpg"]).id
    grandcentral.save
    
    nycair = Category.find_by_code("nycair")
    nycair.category_id = nyc[:id]
    nycair.order = 3
    nycair.image_id = Image.find(:first, :conditions => ["filename = ?", "air_042.jpg"]).id
    nycair.save
    
    post911 = Category.find_by_code("post911")
    post911.category_id = nyc[:id]
    post911.order = 4
    post911.image_id = Image.find(:first, :conditions => ["filename = ?", "nyc_006.jpg"]).id
    post911.save
    
    wtc = Category.find_by_code("wtc")
    wtc.category_id = nyc[:id]
    wtc.order = 5
    wtc.image_id = Image.find(:first, :conditions => ["filename = ?", "wtc_001.jpg"]).id
    wtc.save
    
    guggenheim = Category.find_by_code("guggenheim")
    guggenheim.category_id = nyc[:id]
    guggenheim.order = 6
    guggenheim.image_id = Image.find(:first, :conditions => ["filename = ?", "gm_010.jpg"]).id
    guggenheim.save
    
    centralpark = Category.find_by_code("centralpark")
    centralpark.category_id = nyc[:id]
    centralpark.order = 7
    centralpark.image_id = Image.find(:first, :conditions => ["filename = ?", "nyc1_007.jpg"]).id
    centralpark.save
    
    street = Category.find_by_code("street")
    street.category_id = nyc[:id]
    street.order = 8
    street.image_id = Image.find(:first, :conditions => ["filename = ?", "st066.jpg"]).id
    street.save
    
    stjohns = Category.find_by_code("stjohns")
    stjohns.category_id = nyc[:id]
    stjohns.order = 9
    stjohns.image_id = Image.find(:first, :conditions => ["filename = ?", "sj001.jpg"]).id
    stjohns.save
    
    amnh = Category.find_by_code("amnh")
    amnh.category_id = nyc[:id]
    amnh.order = 10
    amnh.image_id = Image.find(:first, :conditions => ["filename = ?", "amnh067.jpg"]).id
    amnh.save
    
    nycmarathon = Category.find_by_code("nycmarathon")
    nycmarathon.category_id = nyc[:id]
    nycmarathon.order = 11
    nycmarathon.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_5104.jpg"]).id
    nycmarathon.save
    
    # Categories that are part of the Concert level
    u2 = Category.create(:name => "U2", :code => "u2", :category_id => concert[:id], :order => 0)
    u2vertoak = Category.find_by_code("u2vertoak")
    u2vertoak.category_id = u2[:id]
    u2vertoak.order = 0
    u2vertoak.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_1546.jpg"]).id
    u2vertoak.save
        
    vertsanjose = Category.find_by_code("vertsanjose")
    vertsanjose.category_id = u2[:id]
    vertsanjose.order = 1
    vertsanjose.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9173.jpg"]).id
    vertsanjose.save
        
    u2vertsd = Category.find_by_code("u2vertsd")
    u2vertsd.category_id = u2[:id]
    u2vertsd.order = 2
    u2vertsd.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9115.jpg"]).id
    u2vertsd.save
        
    elevationoakland = Category.find_by_code("elevationoakland")
    elevationoakland.category_id = u2[:id]
    elevationoakland.order = 3
    elevationoakland.image_id = Image.find(:first, :conditions => ["filename = ?", "oak_021.jpg"]).id
    elevationoakland.save
        
    u2newyork2 = Category.find_by_code("u2newyork2")
    u2newyork2.category_id = u2[:id]
    u2newyork2.order = 4
    u2newyork2.image_id = Image.find(:first, :conditions => ["filename = ?", "msg_115.jpg"]).id
    u2newyork2.save
        
    elevationnewjersey = Category.find_by_code("elevationnewjersey")
    elevationnewjersey.category_id = u2[:id]
    elevationnewjersey.order = 5
    elevationnewjersey.image_id = Image.find(:first, :conditions => ["filename = ?", "nj_050.jpg"]).id
    elevationnewjersey.save
        
    u2newyork = Category.find_by_code("elevationnewyork")
    u2newyork.category_id = u2[:id]
    u2newyork.order = 6
    u2newyork.image_id = Image.find(:first, :conditions => ["filename = ?", "msg_132.jpg"]).id
    u2newyork.save
        
    elevationsanjose = Category.find_by_code("elevationsanjose")
    elevationsanjose.category_id = u2[:id]
    elevationsanjose.order = 7
    elevationsanjose.image_id = Image.find(:first, :conditions => ["filename = ?", "sj_010.jpg"]).id
    elevationsanjose.save
        
    elevationportland = Category.find_by_code("elevationportland")
    elevationportland.category_id = u2[:id]
    elevationportland.order = 8
    elevationportland.image_id = Image.find(:first, :conditions => ["filename = ?", "bw_011.jpg"]).id
    elevationportland.save
        
    elevationmiami = Category.find_by_code("elevationmiami")
    elevationmiami.category_id = u2[:id]
    elevationmiami.order = 9
    elevationmiami.image_id = Image.find(:first, :conditions => ["filename = ?", "mia_049.jpg"]).id
    elevationmiami.save
        
    sa = Category.find_by_code("sa")
    sa.category_id = u2[:id]
    sa.order = 10
    sa.image_id = Image.find(:first, :conditions => ["filename = ?", "sa057.jpg"]).id
    sa.save
        
    u2seattle = Category.find_by_code("u2seattle")
    u2seattle.category_id = u2[:id]
    u2seattle.order = 11
    u2seattle.image_id = Image.find(:first, :conditions => ["filename = ?", "Sea72.jpg"]).id
    u2seattle.save

    florida = Category.create(:name => "POP Mart Florida", :code => "u2florida", :category_id => u2[:id], :order => 12, :image_id => Image.find(:first, :conditions => ["filename = ?", "TampHW27.jpg"]).id)
    floridatampa = Category.find_by_code("floridatampa")
    floridatampa.category_id = florida[:id]
    floridatampa.order = 0
    floridatampa.image_id = Image.find(:first, :conditions => ["filename = ?", "TampHW27.jpg"]).id
    floridatampa.save
        
    floridaepcot = Category.find_by_code("floridaepcot")
    floridaepcot.category_id = florida[:id]
    floridaepcot.order = 1
    floridaepcot.image_id = Image.find(:first, :conditions => ["filename = ?", "EpcotHW17.jpg"]).id
    floridaepcot.save
        
    floridaday3 = Category.find_by_code("floridaday3")
    floridaday3.category_id = florida[:id]
    floridaday3.order = 2
    floridaday3.image_id = Image.find(:first, :conditions => ["filename = ?", "JaxHW12.jpg"]).id
    floridaday3.save
        
    floridaksc = Category.find_by_code("floridaksc")
    floridaksc.category_id = florida[:id]
    floridaksc.order = 3
    floridaksc.image_id = Image.find(:first, :conditions => ["filename = ?", "KSCHW5.jpg"]).id
    floridaksc.save
        
    floridaday5 = Category.find_by_code("floridaday5")
    floridaday5.category_id = florida[:id]
    floridaday5.order = 4
    floridaday5.image_id = Image.find(:first, :conditions => ["filename = ?", "MiamiRD65.jpg"]).id
    floridaday5.save
        
    floridaday6 = Category.find_by_code("floridaday6")
    floridaday6.category_id = florida[:id]
    floridaday6.order = 5
    floridaday6.image_id = Image.find(:first, :conditions => ["filename = ?", "MiamiHW8.jpg"]).id
    floridaday6.save
        
    floridaday7 = Category.find_by_code("floridaday7")
    floridaday7.category_id = florida[:id]
    floridaday7.order = 6
    floridaday7.image_id = Image.find(:first, :conditions => ["filename = ?", "MiamiHW29.jpg"]).id
    floridaday7.save
        
    u2montreal = Category.find_by_code("u2montreal")
    u2montreal.category_id = u2[:id]
    u2montreal.order = 13
    u2montreal.image_id = Image.find(:first, :conditions => ["filename = ?", "montreal4.jpg"]).id
    u2montreal.save

    u2toronto = Category.find_by_code("u2toronto")
    u2toronto.category_id = u2[:id]
    u2toronto.order = 14
    u2toronto.image_id = Image.find(:first, :conditions => ["filename = ?", "LemonOpen1.jpg"]).id
    u2toronto.save

    u2rfk = Category.find_by_code("u2rfk")
    u2rfk.category_id = u2[:id]
    u2rfk.order = 15
    u2rfk.image_id = Image.find(:first, :conditions => ["filename = ?", "BonoDC9.jpg"]).id
    u2rfk.save

    joshuatree = Category.find_by_code("joshuatree")
    joshuatree.category_id = u2[:id]
    joshuatree.order = 16
    joshuatree.image_id = Image.find(:first, :conditions => ["filename = ?", "tree041.jpg"]).id
    joshuatree.save

    bruce = Category.create(:name => "Bruce Springsteen", :code => "brucespringsteen", :category_id => concert[:id], :order => 1, :image_id => Image.find(:first, :conditions => ["filename = ?", "IMG_4584.jpg"]).id)
    brucefenway2003 = Category.find_by_code("brucefenway2003")
    brucefenway2003.category_id = bruce[:id]
    brucefenway2003.order = 0
    brucefenway2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_4753.jpg"]).id
    brucefenway2003.save
    
    brucesf2003 = Category.find_by_code("brucesf2003")
    brucesf2003.category_id = bruce[:id]
    brucesf2003.order = 1
    brucesf2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_4584.jpg"]).id
    brucesf2003.save
    
    # More concert photography
    chuckbrodsky = Category.find_by_code("chuckbrodsky")
    chuckbrodsky.category_id = concert[:id]
    chuckbrodsky.order = 2
    chuckbrodsky.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_5176.jpg"]).id
    chuckbrodsky.save
    
    jbstockton = Category.find_by_code("jbstockton")
    jbstockton.category_id = concert[:id]
    jbstockton.order = 3
    jbstockton.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9496.jpg"]).id
    jbstockton.save
    
    uf = Category.find_by_code("uf")
    uf.category_id = concert[:id]
    uf.order = 4
    uf.image_id = Image.find(:first, :conditions => ["filename = ?", "bw_024.jpg"]).id
    uf.save
    
    tibet98 = Category.find_by_code("tibet98")
    tibet98.category_id = concert[:id]
    tibet98.order = 5
    tibet98.image_id = Image.find(:first, :conditions => ["filename = ?", "tfc027.jpg"]).id
    tibet98.save
    
    # Categories that are part of the Europe level
    france = Category.create(:name => "France", :code => "france", :category_id => europe[:id], :order => 0, :id => Image.find(:first, :conditions => ["filename = ?", "CRW_6291.jpg"]).id)
    ny2005 = Category.find_by_code("ny2005")
    ny2005.category_id = france[:id]
    ny2005.order = 0
    ny2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0846.jpg"]).id
    ny2005.save
    
    loire2005 = Category.find_by_code("loire2005")
    loire2005.category_id = france[:id]
    loire2005.order = 1
    loire2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9277.jpg"]).id
    loire2005.save
    
    paris2005 = Category.find_by_code("paris2005")
    paris2005.category_id = france[:id]
    paris2005.order = 2
    paris2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_2610.jpg"]).id
    paris2005.save
    
    iceland2004 = Category.find_by_code("iceland2004")
    iceland2004.category_id = europe[:id]
    iceland2004.order = 1
    iceland2004.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_6291.jpg"]).id
    iceland2004.save
    
    ireland = Category.create(:name => "Ireland", :code => "ireland", :category_id => europe[:id], :order => 2, :image_id => Image.find(:first, :conditions => ["filename = ?", "pic036.jpg"]).id)
    d2000d1 = Category.find_by_code("d2000d1")
    d2000d1.category_id = ireland[:id]
    d2000d1.order = 0
    d2000d1.image_id = Image.find(:first, :conditions => ["filename = ?", "pic001.jpg"]).id
    d2000d1.save
        
    d2000d2 = Category.find_by_code("d2000d2")
    d2000d2.category_id = ireland[:id]
    d2000d2.order = 1
    d2000d2.image_id = Image.find(:first, :conditions => ["filename = ?", "pic009.jpg"]).id
    d2000d2.save
        
    d2000d3 = Category.find_by_code("d2000d3")
    d2000d3.category_id = ireland[:id]
    d2000d3.order = 2
    d2000d3.image_id = Image.find(:first, :conditions => ["filename = ?", "pic016.jpg"]).id
    d2000d3.save
        
    d2000d4 = Category.find_by_code("d2000d4")
    d2000d4.category_id = ireland[:id]
    d2000d4.order = 3
    d2000d4.image_id = Image.find(:first, :conditions => ["filename = ?", "pic018.jpg"]).id
    d2000d4.save
        
    d2000d5 = Category.find_by_code("d2000d5")
    d2000d5.category_id = ireland[:id]
    d2000d5.order = 4
    d2000d5.image_id = Image.find(:first, :conditions => ["filename = ?", "pic004.jpg"]).id
    d2000d5.save
        
    d2000d6 = Category.find_by_code("d2000d6")
    d2000d6.category_id = ireland[:id]
    d2000d6.order = 5
    d2000d6.image_id = Image.find(:first, :conditions => ["filename = ?", "pic001.jpg"]).id
    d2000d6.save
        
    d2000d7 = Category.find_by_code("d2000d7")
    d2000d7.category_id = ireland[:id]
    d2000d7.order = 6
    d2000d7.image_id = Image.find(:first, :conditions => ["filename = ?", "pic001.jpg"]).id
    d2000d7.save
        
    # Categories that are part of the Star Wars level
    indy05 = Category.create(:name => "Episode III - Fan Club Celebration - Indianapolis, IN", :code => "indy05", :category_id => starwars[:id], :order => 0, :image_id => Image.find(:first, :conditions => ["filename = ?", "IMG_9966.jpg"]).id)
    indy05d3 = Category.find_by_code("indy05d3")
    indy05d3.category_id = indy05[:id]
    indy05d3.order = 0
    indy05d3.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9966.jpg"]).id
    indy05d3.save
    
    indy05d4 = Category.find_by_code("indy05d4")
    indy05d4.category_id = indy05[:id]
    indy05d4.order = 1
    indy05d4.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0264.jpg"]).id
    indy05d4.save
    
    aotcsf = Category.find_by_code("aotcsf")
    aotcsf.category_id = starwars[:id]
    aotcsf.order = 1
    aotcsf.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_1070.jpg"]).id
    aotcsf.save
    
    indy02 = Category.create(:name => "Episode II - Fan Club Celebration - Indianapolis, IN", :code => "indy02", :category_id => starwars[:id], :order => 2, :image_id => Image.find(:first, :conditions => ["filename = ?", "CRW_0680.jpg"]).id)
    indy02d1 = Category.find_by_code("indy02d1")
    indy02d1.category_id = indy02[:id]
    indy02d1.order = 0
    indy02d1.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_0680.jpg"]).id
    indy02d1.save
        
    indy02d2 = Category.find_by_code("indy02d2")
    indy02d2.category_id = indy02[:id]
    indy02d2.order = 1
    indy02d2.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_1007.jpg"]).id
    indy02d2.save
        
    indy02d3 = Category.find_by_code("indy02d3")
    indy02d3.category_id = indy02[:id]
    indy02d3.order = 2
    indy02d3.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_1043.jpg"]).id
    indy02d3.save
        
    rancho = Category.find_by_code("rancho")
    rancho.category_id = starwars[:id]
    rancho.order = 3
    rancho.image_id = Image.find(:first, :conditions => ["filename = ?", "sw_069.jpg"]).id
    rancho.save
    
    podracer = Category.find_by_code("podracer")
    podracer.category_id = starwars[:id]
    podracer.order = 4
    podracer.image_id = Image.find(:first, :conditions => ["filename = ?", "pr_004.jpg"]).id
    podracer.save
    
    la = Category.find_by_code("la")
    la.category_id = starwars[:id]
    la.order = 5
    la.image_id = Image.find(:first, :conditions => ["filename = ?", "line003.jpg"]).id
    la.save
    
    denver99 = Category.find_by_code("denver99")
    denver99.category_id = starwars[:id]
    denver99.order = 6
    denver99.image_id = Image.find(:first, :conditions => ["filename = ?", "sw070.jpg"]).id
    denver99.save
    
    smithsonian = Category.find_by_code("smithsonian")
    smithsonian.category_id = starwars[:id]
    smithsonian.order = 7
    smithsonian.image_id = Image.find(:first, :conditions => ["filename = ?", "nasm023.jpg"]).id
    smithsonian.save
    
    swtw = Category.find_by_code("swtw")
    swtw.category_id = starwars[:id]
    swtw.order = 8
    swtw.image_id = Image.find(:first, :conditions => ["filename = ?", "SWCrowd2.jpg"]).id
    swtw.save
    
    # Categories that are part of the Texas level
    texas2003 = Category.find_by_code("texas2003")
    texas2003.category_id = texas[:id]
    texas2003.order = 0
    texas2003.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_3293.jpg"]).id
    texas2003.save
    
    texas2004 = Category.find_by_code("texas2004")
    texas2004.category_id = texas[:id]
    texas2004.order = 1
    texas2004.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_5947.jpg"]).id
    texas2004.save
    
    texas2005 = Category.find_by_code("texas2005")
    texas2005.category_id = texas[:id]
    texas2005.order = 2
    texas2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0293.jpg"]).id
    texas2005.save
    
    # Categories that are part of the North East level
    main2003 = Category.find_by_code("main2003")
    main2003.category_id = northEast[:id]
    main2003.order = 0
    main2003.image_id = Image.find(:first, :conditions => ["filename = ?", "maine200300105_JFR.jpg"]).id
    main2003.save
        
    main2001 = Category.find_by_code("main2001")
    main2001.category_id = northEast[:id]
    main2001.order = 1
    main2001.image_id = Image.find(:first, :conditions => ["filename = ?", "maine_050.jpg"]).id
    main2001.save
        
    vermont = Category.find_by_code("vermont")
    vermont.category_id = northEast[:id]
    vermont.order = 2
    vermont.image_id = Image.find(:first, :conditions => ["filename = ?", "Vermont37.jpg"]).id
    vermont.save
        
    walden = Category.find_by_code("walden")
    walden.category_id = northEast[:id]
    walden.order = 3
    walden.image_id = Image.find(:first, :conditions => ["filename = ?", "walden010.jpg"]).id
    walden.save
        
    hempsteadharbor = Category.find_by_code("hempsteadharbor")
    hempsteadharbor.category_id = northEast[:id]
    hempsteadharbor.order = 4
    hempsteadharbor.image_id = Image.find(:first, :conditions => ["filename = ?", "hh003.jpg"]).id
    hempsteadharbor.save
        
    fallingwater = Category.find_by_code("fallingwater")
    fallingwater.category_id = northEast[:id]
    fallingwater.order = 5
    fallingwater.image_id = Image.find(:first, :conditions => ["filename = ?", "fw_005.jpg"]).id
    fallingwater.save
        
    # Categories that are part of the Great American Drive level
    
    # Categories that are part of the Astro Photography level
    eclipse = Category.find_by_code("eclipse")
    eclipse.category_id = space[:id]
    eclipse.order = 0
    eclipse.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_3405.jpg"]).id
    eclipse.save
    
    astro = Category.find_by_code("astro")
    astro.category_id = space[:id]
    astro.order = 1
    astro.image_id = Image.find(:first, :conditions => ["filename = ?", "22_RT8.jpg"]).id
    astro.save
    
    leonids = Category.find_by_code("leonids")
    leonids.category_id = space[:id]
    leonids.order = 2
    leonids.image_id = Image.find(:first, :conditions => ["filename = ?", "mt_008.jpg"]).id
    leonids.save
    
    aurora = Category.find_by_code("aurora")
    aurora.category_id = space[:id]
    aurora.order = 3
    aurora.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_5050.jpg"]).id
    aurora.save
    
    # Categories that are part of the POV-Ray level
    
    # Categories that are part of the Friends & Family level
    ourwedding = Category.create(:name => "Our Wedding", :code => "ourwedding", :category_id => ff[:id], :order => 0, :image_id => Image.find(:first, :conditions => ["filename = ?", "fc12.jpg"]).id)

    preparing = Category.find_by_code("preparing")
    preparing.category_id = ourwedding[:id]
    preparing.order = 0
    preparing.image_id = Image.find(:first, :conditions => ["filename = ?", "fc119.jpg"]).id
    preparing.save
        
    weddingday = Category.find_by_code("weddingday")
    weddingday.category_id = ourwedding[:id]
    weddingday.order = 1
    weddingday.image_id = Image.find(:first, :conditions => ["filename = ?", "fc12.jpg"]).id
    weddingday.save

    hawaii = Category.create(:name => "Honeymoon in Hawaii", :code => "hawaii", :category_id => ourwedding[:id], :order => 2, :image_id => Image.find(:first, :conditions => ["filename = ?", "IMG_8372.jpg"]).id)
        
    hilo = Category.find_by_code("hilo")
    hilo.category_id = hawaii[:id]
    hilo.order = 0
    hilo.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_8139.jpg"]).id
    hilo.save
        
    volcano = Category.find_by_code("volcano")
    volcano.category_id = hawaii[:id]
    volcano.order = 1
    volcano.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_7906.jpg"]).id
    volcano.save
        
    kona = Category.find_by_code("kona")
    kona.category_id = hawaii[:id]
    kona.order = 2
    kona.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_8329.jpg"]).id
    kona.save
        
    usshornet = Category.find_by_code("usshornet")
    usshornet.category_id = ff[:id]
    usshornet.order = 1
    usshornet.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_7705.jpg"]).id
    usshornet.save
        
    lucky = Category.find_by_code("lucky")
    lucky.category_id = ff[:id]
    lucky.order = 2
    lucky.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_6038.jpg"]).id
    lucky.save
        
    christmas2005 = Category.find_by_code("christmas2005")
    christmas2005.category_id = ff[:id]
    christmas2005.order = 3
    christmas2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_2051.jpg"]).id
    christmas2005.save
        
    novatotree = Category.find_by_code("novatotree")
    novatotree.category_id = ff[:id]
    novatotree.order = 4
    novatotree.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_1923.jpg"]).id
    novatotree.save
        
    tree2005 = Category.find_by_code("tree2005")
    tree2005.category_id = ff[:id]
    tree2005.order = 5
    tree2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9590.jpg"]).id
    tree2005.save
        
    vintage = Category.find_by_code("vintage")
    vintage.category_id = ff[:id]
    vintage.order = 6
    vintage.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9589.jpg"]).id
    vintage.save
        
    ggnb = Category.find_by_code("ggnb")
    ggnb.category_id = ff[:id]
    ggnb.order = 7
    ggnb.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9580.jpg"]).id
    ggnb.save
        
    tg2005 = Category.find_by_code("tg2005")
    tg2005.category_id = ff[:id]
    tg2005.order = 8
    tg2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_1757.jpg"]).id
    tg2005.save
        
    jonlewed = Category.find_by_code("jonlewed")
    jonlewed.category_id = ff[:id]
    jonlewed.order = 9
    jonlewed.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0483.jpg"]).id
    jonlewed.save
        
    nyengagement = Category.find_by_code("nyengagement")
    nyengagement.category_id = ff[:id]
    nyengagement.order = 10
    nyengagement.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0167.jpg"]).id
    nyengagement.save
        
    yoseaug05 = Category.find_by_code("yoseaug05")
    yoseaug05.category_id = ff[:id]
    yoseaug05.order = 11
    yoseaug05.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_8940.jpg"]).id
    yoseaug05.save
        
    yosemday2005 = Category.find_by_code("yosemday2005")
    yosemday2005.category_id = ff[:id]
    yosemday2005.order = 12
    yosemday2005.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9122.jpg"]).id
    yosemday2005.save
        
    caengagementparty = Category.find_by_code("caengagementparty")
    caengagementparty.category_id = ff[:id]
    caengagementparty.order = 13
    caengagementparty.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_9122.jpg"]).id
    caengagementparty.save
        
    dad60 = Category.find_by_code("dad60")
    dad60.category_id = ff[:id]
    dad60.order = 14
    dad60.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_2052.jpg"]).id
    dad60.save
        
    nye2003 = Category.find_by_code("nye2003")
    nye2003.category_id = ff[:id]
    nye2003.order = 15
    nye2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_5442.jpg"]).id
    nye2003.save
        
    efa2003 = Category.find_by_code("efa2003")
    efa2003.category_id = ff[:id]
    efa2003.order = 16
    efa2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_3844.jpg"]).id
    efa2003.save
        
    b2b2003 = Category.find_by_code("b2b2003")
    b2b2003.category_id = ff[:id]
    b2b2003.order = 17
    b2b2003.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_3416.jpg"]).id
    b2b2003.save
        
    wildflower = Category.find_by_code("wildflower")
    wildflower.category_id = ff[:id]
    wildflower.order = 18
    wildflower.image_id = Image.find(:first, :conditions => ["filename = ?", "2194-475-21f.jpg"]).id
    wildflower.save
        
    solvang = Category.find_by_code("solvang")
    solvang.category_id = ff[:id]
    solvang.order = 19
    solvang.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_2964.jpg"]).id
    solvang.save

    # San Franciso 1/2 Marathon
            
    treasureisland = Category.find_by_code("treasureisland")
    treasureisland.category_id = ff[:id]
    treasureisland.order = 21
    treasureisland.image_id = Image.find(:first, :conditions => ["filename = ?", "sf2002treasureisl1.jpg"]).id
    treasureisland.save
        
    pacgrove = Category.find_by_code("pacgrove")
    pacgrove.category_id = ff[:id]
    pacgrove.order = 22
    pacgrove.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_1663.jpg"]).id
    pacgrove.save
        
    practicetri = Category.find_by_code("practicetri")
    practicetri.category_id = ff[:id]
    practicetri.order = 23
    practicetri.image_id = Image.find(:first, :conditions => ["filename = ?", "swimgroup1_eid60.jpg"]).id
    practicetri.save
        
    jmgrad = Category.find_by_code("jmgrad")
    jmgrad.category_id = ff[:id]
    jmgrad.order = 24
    jmgrad.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_3648.jpg"]).id
    jmgrad.save
        
    yosefriends = Category.find_by_code("yosefriends")
    yosefriends.category_id = ff[:id]
    yosefriends.order = 25
    yosefriends.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_1841_L16_A_+10_f_200.jpg"]).id
    yosefriends.save
        
    tjn = Category.find_by_code("tjn")
    tjn.category_id = ff[:id]
    tjn.order = 26
    tjn.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_1326.jpg"]).id
    tjn.save
        
    henry30 = Category.find_by_code("henry30")
    henry30.category_id = ff[:id]
    henry30.order = 27
    henry30.image_id = Image.find(:first, :conditions => ["filename = ?", "CRW_0575.jpg"]).id
    henry30.save
        
    debbd = Category.find_by_code("debbd")
    debbd.category_id = ff[:id]
    debbd.order = 28
    debbd.image_id = Image.find(:first, :conditions => ["filename = ?", "IMG_0651.jpg"]).id
    debbd.save
        
    hofstra = Category.find_by_code("hofstra")
    hofstra.category_id = ff[:id]
    hofstra.order = 29
    hofstra.image_id = Image.find(:first, :conditions => ["filename = ?", "hof_006.jpg"]).id
    hofstra.save
        
    kmo = Category.find_by_code("kmo")
    kmo.category_id = ff[:id]
    kmo.order = 30
    kmo.image_id = Image.find(:first, :conditions => ["filename = ?", "105-565_CRW.jpg"]).id
    kmo.save
        
    skydive = Category.find_by_code("skydive")
    skydive.category_id = ff[:id]
    skydive.order = 31
    skydive.image_id = Image.find(:first, :conditions => ["filename = ?", "sd006.jpg"]).id
    skydive.save
    
    # Kayaking in Bolinas
        
  end

  def self.down
    CategoryImage.delete_all
    Image.delete_all
    Category.delete_all
  end
  
end
